#include <stdlib.h>
#include <inttypes.h>
#include "packet.h"

#define DCMOTOR_ON 1
#define DCMOTOR_OFF 0

packet_t *dc_motor_position(uint8_t channel1, uint16_t position1, 
			uint8_t channel2, uint16_t position2, uint16_t time);
packet_t *dc_motor_pwm(uint8_t channel, uint16_t pwm, uint16_t time);
packet_t *dc_motor_velocity(uint8_t channel, uint16_t velocity, uint16_t time);
packet_t *servo_motor(uint8_t servo, uint16_t position, uint16_t time);

packet_t *dc_motor_polarity(uint8_t channel, uint8_t polarity);
packet_t *dc_motor_pid_position(uint8_t channel, uint8_t kp,
						uint8_t kd,
						uint8_t ki);
packet_t *dc_motor_pid_velocity(uint8_t channel, uint8_t kp,
						uint8_t kd,
						uint8_t ki);
packet_t *dc_motor_sensor_usage(uint8_t channel, uint8_t usage);
packet_t *dc_motor_control_method(uint8_t channel, uint8_t method);
packet_t *dc_motor_state(uint8_t state);

packet_t *get_motor_control_signal(uint8_t *n);
packet_t *get_sensor_feedback_signal(uint8_t *n);
packet_t *ping_pms5005();
